'use strict';
const BaseService = require('./base');

class SysOperLogService extends BaseService {


    async insertSelective(record){
        let conn = await this.app.mysql;
        let params = {
            oper_source:record.operSource,
            request_method:record.requestMethod,
            operator_type:record.operatorType,
            operator_id:record.operatorId,
            operator_name:record.operatorName,
            oper_url:record.operUrl,
            oper_ip:record.operIp,
            oper_location:record.operLocation,
            oper_parans_args:record.operParansArgs,
            oper_query_args:record.operQueryArgs,
            oper_body_args:record.operBodyArgs,
            oper_time:new Date()
        };
        let insertResult = await conn.insert('sys_oper_log', params);

        return insertResult.affectedRows;
    }


}

module.exports = SysOperLogService;
